package com.ruoyi.project.check.service.impl;

import com.ruoyi.project.check.domain.CheckMode;
import com.ruoyi.project.check.mapper.CheckModeMapper;
import com.ruoyi.project.check.service.ICheckModeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CheckModeServiceImpl implements ICheckModeService {
    @Autowired
    private CheckModeMapper checkModeMapper;
    @Override
    public List<CheckMode> seliIcheckByCodeService(String checkCode) {
        return checkModeMapper.selCheckByCode(checkCode);
    }

    //修改flag的值
    @Override
    public int updateFlag(String checkCode) {
        return checkModeMapper.updateFlag(checkCode);
    }

    @Override
    public List<CheckMode> selCheckResultSrvice(String checkCode) {
        return checkModeMapper.selCheckResult(checkCode);
    }

    @Override
    public int updateCheckFile(String checkResult, String fileSite, String checkCode) {
        //截取
        /*String str1=checkResult.substring(0,checkResult.indexOf(":"));
        String str2=checkResult.substring(str1.length()+1,checkResult.length()-1);
        System.out.println(str2);*/
        return checkModeMapper.updateCheckFile(checkResult, fileSite, checkCode);
    }

    @Override
    public List<CheckMode> selCheckAllResultSrvice(String checkCode) {
        return checkModeMapper.selCheckAllResult(checkCode);
    }

    @Override
    public CheckMode selByCodeFileService(String checkCode) {
        return checkModeMapper.selByCodeHxFile(checkCode);
    }


}
